//
//  ByteArrayUtils.swift
//  uwantgoeasy
//
//  Created by 冯传宝 on 12/21/15.
//  Copyright © 2015 uwantsoft. All rights reserved.
//

import Foundation

class ByteArrayUtils {
    
    class func fromByteArray<T>(value: [UInt8], _: T.Type) -> T {
        return value.withUnsafeBufferPointer {
            return UnsafePointer<T>($0.baseAddress).memory
        }
    }
}